#include <cstdio>
#include <cstring>

typedef long long ll;
const int N = 1e5 + 5, mod = 998244353;
int n, m, cnt;
int e_cnt, heads[N], tot[N], siz[N], rt[N], vic[N];
bool vis[N], f[N], g[N];
ll ans[N][2];

struct Edge {
  int v, nxt;
} e[N << 1];

inline void add(int u, int v) {
  e[++e_cnt].v = v, e[e_cnt].nxt = heads[u], heads[u] = e_cnt;
}

void dfs1(int u, int fa) {
  vis[u] = true;
  for (int i = heads[u], v; i; i = e[i].nxt) {
    if ((v = e[i].v) != fa) {
      dfs1(v, u);
      f[u] |= !f[v];
    }
  }
}

void dfs2(int u, int fa) {
  vis[u] = true;
  if (!g[fa]) g[u] = true, tot[u]++;
  if (g[fa] && tot[fa] == 1 && !f[u]) g[u] = true;
  for (int i = heads[u]; i; i = e[i].nxt) {
    if (e[i].v != fa && !f[e[i].v]) ++tot[u];
  }
  for (int i = heads[u], v; i; i = e[i].nxt) {
    if ((v = e[i].v) != fa) {
      dfs2(v, u);
      vic[u] += vic[v];
      siz[u] += siz[v];
      g[u] |= !f[v];
    }
  }
  vic[u] += g[u], siz[u] += 1;
}

int main() {
#ifndef ONLINE_JUDGE
#ifdef LOCAL
  freopen("testdata.in", "r", stdin);
  freopen("testdata.out", "w", stdout);
#else
  freopen("forest.in", "r", stdin);
  freopen("forest.out", "w", stdout);
#endif
#endif

  scanf("%d%d", &n, &m);
  for (int i = 1, u, v; i <= m; ++i) {
    scanf("%d%d", &u, &v);
    add(u, v);
    add(v, u);
  }
  for (int i = 1; i <= n; ++i) {
    if (!vis[i]) dfs1(i, i);
  }
  memset(vis, 0, sizeof(vis));
  for (int i = 1; i <= n; ++i) {
    if (!vis[i]) {
      rt[++cnt] = i;
      g[i] = f[i];
      for (int j = heads[i]; j; j = e[j].nxt) {
        if (!f[e[j].v]) ++tot[i];
      }
      vic[i] = g[i], siz[i] = 1;
      for (int j = heads[i], v; j; j = e[j].nxt) {
        dfs2(v = e[j].v, i);
        siz[i] += siz[v];
        vic[i] += vic[v];
      }
    }
  }
  ans[0][0] = 1;
  for (int i = 1; i <= cnt; ++i) {
    ans[i][0] = ans[i - 1][1] * vic[rt[i]] % mod +
                ans[i - 1][0] * (siz[rt[i]] - vic[rt[i]]) % mod;
    ans[i][1] = ans[i - 1][0] * vic[rt[i]] % mod +
                ans[i - 1][1] * (siz[rt[i]] - vic[rt[i]]) % mod;
    if (ans[i][0] >= mod) ans[i][0] -= mod;
    if (ans[i][1] >= mod) ans[i][1] -= mod;
  }
  printf("%lld", ans[cnt][0]);
  return 0;
}